package org.fast.develop.logicflow.runtime;

import org.fast.develop.logicflow.runtime.expression.VariableScope;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

/**
 * 项 目 名：gs-tto-data-mapping
 * 源文件名：com.geekstorm.tto.datamapping.core.expression.DefaultVariableScope 文件版本：1.0.0 创建人：
 * 莫寅 创建日期：2020-07-23 11:25 修改作者：莫寅 修改日期：2020-07-23 11:25 文件描述： By：2020 © CompanyName ,
 * Inc. All Rights Reserved.
 */
public class DefaultVariableScope implements VariableScope {

	private Map<String, Object> variables = new HashMap<String, Object>();

	public DefaultVariableScope(Map<String, Object> variables) {
		this.variables = variables;
	}

	@Override
	public Map<String, Object> getVariables() {
		// TODO Auto-generated method stub
		return variables;
	}

	@Override
	public Map<String, Object> getVariables(Collection<String> variableNames) {
		// TODO Auto-generated method stub
		return variables;
	}

	@Override
	public Map<String, Object> getVariables(Collection<String> variableNames, boolean fetchAllVariables) {
		// TODO Auto-generated method stub
		return variables;
	}

	@Override
	public Map<String, Object> getVariablesLocal() {
		// TODO Auto-generated method stub
		return variables;
	}

	@Override
	public Map<String, Object> getVariablesLocal(Collection<String> variableNames) {
		// TODO Auto-generated method stub
		return variables;
	}

	@Override
	public Map<String, Object> getVariablesLocal(Collection<String> variableNames, boolean fetchAllVariables) {
		// TODO Auto-generated method stub
		return variables;
	}

	@Override
	public Object getVariable(String variableName) {
		// TODO Auto-generated method stub
		return variables.get(variableName);
	}

	@Override
	public Object getVariable(String variableName, boolean fetchAllVariables) {
		// TODO Auto-generated method stub
		return this.getVariable(variableName);
	}

	@Override
	public Object getVariableLocal(String variableName) {
		// TODO Auto-generated method stub
		return this.getVariable(variableName);
	}

	@Override
	public Object getVariableLocal(String variableName, boolean fetchAllVariables) {
		// TODO Auto-generated method stub
		return this.getVariable(variableName);
	}

	@Override
	public <T> T getVariable(String variableName, Class<T> variableClass) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public <T> T getVariableLocal(String variableName, Class<T> variableClass) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Set<String> getVariableNames() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Set<String> getVariableNamesLocal() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void setVariable(String variableName, Object value) {
		// TODO Auto-generated method stub
		variables.put(variableName, value);
	}

	@Override
	public void setVariable(String variableName, Object value, boolean fetchAllVariables) {
		// TODO Auto-generated method stub
		this.setVariable(variableName, value);
	}

	@Override
	public Object setVariableLocal(String variableName, Object value) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object setVariableLocal(String variableName, Object value, boolean fetchAllVariables) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void setVariables(Map<String, ? extends Object> variables) {
		// TODO Auto-generated method stub
		this.variables = (Map<String, Object>) variables;
	}

	@Override
	public void setVariablesLocal(Map<String, ? extends Object> variables) {
		// TODO Auto-generated method stub
		this.variables = (Map<String, Object>) variables;
	}

	@Override
	public boolean hasVariables() {
		// TODO Auto-generated method stub
		return variables.size() > 0;
	}

	@Override
	public boolean hasVariablesLocal() {
		// TODO Auto-generated method stub
		return variables.size() > 0;
	}

	@Override
	public boolean hasVariable(String variableName) {
		// TODO Auto-generated method stub
		return variables.containsKey(variableName);
	}

	@Override
	public boolean hasVariableLocal(String variableName) {
		// TODO Auto-generated method stub
		return variables.containsKey(variableName);
	}

	public void createVariableLocal(String variableName, Object value) {
		// TODO Auto-generated method stub

	}

	@Override
	public void removeVariable(String variableName) {
		// TODO Auto-generated method stub

	}

	@Override
	public void removeVariableLocal(String variableName) {
		// TODO Auto-generated method stub

	}

	@Override
	public void removeVariables(Collection<String> variableNames) {
		// TODO Auto-generated method stub

	}

	@Override
	public void removeVariablesLocal(Collection<String> variableNames) {
		// TODO Auto-generated method stub

	}

	@Override
	public void removeVariables() {
		// TODO Auto-generated method stub

	}

	@Override
	public void removeVariablesLocal() {
		// TODO Auto-generated method stub

	}

	@Override
	public void setTransientVariable(String variableName, Object variableValue) {

	}

	@Override
	public void setTransientVariableLocal(String variableName, Object variableValue) {

	}

	@Override
	public void setTransientVariables(Map<String, Object> transientVariables) {

	}

	@Override
	public Object getTransientVariable(String variableName) {
		return null;
	}

	@Override
	public Map<String, Object> getTransientVariables() {
		return null;
	}

	@Override
	public void setTransientVariablesLocal(Map<String, Object> transientVariables) {

	}

	@Override
	public Object getTransientVariableLocal(String variableName) {
		return null;
	}

	@Override
	public Map<String, Object> getTransientVariablesLocal() {
		return null;
	}

	@Override
	public void removeTransientVariableLocal(String variableName) {

	}

	@Override
	public void removeTransientVariable(String variableName) {

	}

	@Override
	public void removeTransientVariables() {

	}

	@Override
	public void removeTransientVariablesLocal() {

	}

}
